<%@ page contentType="text/html; charset=UTF-8" language="java" import="java.sql.*" errorPage="" %>
<%request.setCharacterEncoding("UTF-8");%>
<%@page import="wt.httpgw.URLFactory"%>

<%String baseUrl = new URLFactory().getBaseHREF(); %>
<html>
<body  onload="soaOpen();window.focus();" onunload="soaClose();">
<script language="javascript">
	var bDocOpen = false;
	function soaOpen() 
	{ 
		try {
			///////////// 主要代码  ////////////////////////////////////
			formData.SOAOfficeCtrl.WebOpen( "accp.doc",2,"Someone");  // 
			////////////////////////////////////////////////////////////
		}
		catch (e)
		{
			alert("文档加载失败!\n错误信息："+e.message);
		}
	} 
	function soaClose()
	{
		try {
			if (bDocOpen)
				formData.SOAOfficeCtrl.Close();
			return true; 
		} 
		catch (e) 
		{ 
			alert("关闭文档失败!\n错误信息："+e.message); 
			return false; 
		} 
	}
</script>
		<SCRIPT language="JavaScript" event="OnDocumentOpened(str, obj)" for="SOAOfficeCtrl">
			bDocOpen = true;
		</SCRIPT>
		<SCRIPT language="JavaScript" event="OnDocumentClosed()" for="SOAOfficeCtrl">
			bDocOpen = false;
		</SCRIPT>
<form name="formData" method="post"  id="formData">
	<OBJECT id="SOAOfficeCtrl" codeBase="<%=baseUrl %>shmged/SOADemo/SOAOffice.ocx#version=3,1,1,0" height="100%" width="100%" classid="clsid:BBD0982A-63C3-4105-B7AF-5FF3E2649082" data=""> 
	<param name="Server" value="ims.cqc.com">
	<param name="SaveDocURL" value="SaveDoc.jsp">
	<param name="ServerPort" value="4357">
	</OBJECT>
</form>
</body>
</html>